import fetch from 'common/src/utils/fetch'

/**
 *代理申请
 */
function agentApply(data) {
    return fetch({
        url: '/api/electionservice/elcMutualAudit/agentApply',
        data:data,
        method: 'post',
    });
}

/**
 *审核
 */
// function aduit(id) {
//     return fetch({
//         url: '/api/electionservice/elcMutualAudit/agentApply?id='+id,
//         method: 'post',
//     });
// }

function aduit(data) {
    return fetch({
        url: '/api/electionservice/elcMutualAudit/aduit',
        method: 'post',
        data
    });
}
 function batchAudit(data){
     return fetch({
        url: '/api/electionservice/elcMutualAudit/batchAudit',
        method: 'post',
        data
     })
 }
/**
 *驳回
 */
function reject(id,auditReason) {
    return fetch({
        url: '/api/electionservice/elcMutualCross/addAll',
        params:{id:id,auditReason:auditReason},
        method: 'post',
    });
}

//查询所有学院接口

    function getAllCollege(virtualDept,type,manageDept) {
        return fetch({
            url: 'api/electionservice/elcMutualCourses/findDept?virtualDept=' + virtualDept + '&type=' + type + '&manageDept=' + manageDept,
            method: 'get',
        });
    }
    


export default {
    "agentApply": agentApply,
    "aduit": aduit,
    "reject":reject,
    getAllCollege,
    batchAudit
}



